xm: Fix xm shutdown for xendomains.
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 8 Apr 2008 08:57:37 +0000 (09:57 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 8 Apr 2008 08:57:37 +0000 (09:57 +0100)
If xm shutdown command is passed the domain ID, it should still wait
for the shutdown completion of the domain if passed option --wait.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
tools/python/xen/xm/shutdown.py

index 6903183e9aa1867f8207b69620b0f42c3ba66af4..2e6294a979285a486dcbebb575284395b1bc2123 100644 (file)
@@ -144,7 +144,7 @@ def main_all(opts, args):
 def main_dom(opts, args):
     if len(args) == 0: opts.err('No domain parameter given')
     if len(args) >  1: opts.err('No multiple domain parameters allowed')
-    dom = args[0]
+    dom = sxp.child_value(server.xend.domain(args[0]), 'name')
     if serverType == SERVER_XEN_API:
         dom = get_single_vm(dom)
     mode = shutdown_mode(opts)